43e2ca5a3fe44716f97ce8d4f90cc685147d58bd,alogic-common/src/main/java/com/anysoft/util/Settings.java,Settings,fromXML,#Element#,284
Before Change
if (isFinal){
String oldValue = this._GetValue(id);
if (oldValue == null || oldValue.length() <= 0){
SetValue(id,value);
}
}else{
SetValue(id,value);
After Change
Element e = (Element)node;
String id = XmlTools.getString(e,"id","");
String value = XmlTools.getString(e,"value","");
if (StringUtils.isEmpty(id) || StringUtils.isEmpty(value)){
continue;
}
//支æŒ?finalæ ‡ç¤º,如果final为true,则ä¸?覆盖原有的å?–值
boolean isFinal = XmlTools.getBoolean(e, "final", false);
if (isFinal){
String oldValue = GetValue(id, "", false,false);
if (StringUtils.isEmpty(oldValue)){
SetValue(id,value);
boolean system = XmlTools.getBoolean(e, "system", false);
if (system){
System.setProperty(id, value);
logger.info(String.format("Set system property:%s=%s", id,value));
}
}
}else{
SetValue(id,value);
boolean system = XmlTools.getBoolean(e, "system", false);
if (system){
System.setProperty(id, value);
logger.info(String.format("Set system property:%s=%s", id,value));
}
}